using namespace std::tr1;

class Python_ptr : public shared_ptr<PyObject> {
private:
	static void XDecRef(PyObject* object) {
		Py_XDECREF(object);
	}
public:
	Python_ptr() {}
	Python_ptr(PyObject* object) :
	  shared_ptr<PyObject>(object, std::ptr_fun(Python_ptr::XDecRef)) {
	}
};